package com.grandtech.insurance.common.core.coding;

import java.util.Set;

public abstract class Filter {
    public static final Filter ALL = new Filter() {
        public boolean include(String layerName) {
            return true;
        }
    };

    public Filter() {
    }

    public abstract boolean include(String var1);

    public static final class Any extends Filter {
        private final Set<String> layerNames;

        public Any(Set<String> layerNames) {
            this.layerNames = layerNames;
        }

        public boolean include(String layerName) {
            return this.layerNames.contains(layerName);
        }
    }

    public static final class Single extends Filter {
        private final String layerName;

        public Single(String layerName) {
            this.layerName = layerName;
        }

        public boolean include(String layerName) {
            return this.layerName.equals(layerName);
        }
    }
}
